package com.tf.xx.controller;

import com.tf.xx.config.ResourceNotFoundException;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsultController {
    @GetMapping(value = "/student/findById", produces = MediaType.APPLICATION_JSON_VALUE)
    public String findById(@RequestParam Integer id) {
        String student = null;
        if (student == null){
            throw new ResourceNotFoundException("Student not found for this id : " + id);
        }
        return student;
    }
}
